added tests and stuff