working on validation method