added templates for uggly algorithms on validations - TODO: complete the algorithms, make them prettier and add an unit test