add tests to code