completed a basic input validation