cleanup
added tests