added tests and updated readme