added tests and modified readme