handing input errors