validation method added