database and models validations added