create seprate class for validation