clean up and add more tests
add more tests