reading devices with input.h