cleanup
add a few tests