second commit, added a few validations