Task 1

Added validation