added validations and a gem