Writing a driver