added consol input validation