refactored tests and individualized each function. Also changed the return convention for the compare method.