added validations, thanker, simplified and refactored a ton