#7 add input chececker and handler