added user input validator