input validation

included input validation in tasks