validate function and class method implemented w. tests

validate function and class method implemented w. tests.