closes #2 add tests