basic input validation in place