added tests for all functions