added a couple of validations