defining input codes