minor changes input validation