fixed checkInput