added input validation and usage