added more validations, a little confusing