working on input check