improved handle input form