added tests, now needs TDD