added some validations