tiny bugs
add tests - closes #46