added tests and benchmark