added CRUD functions and validations