Code for receiving input