added some basic validations