added a lot of validations