added basic validations // controller functions