added tests for new code