wrote unit tests for instance class methods