added test, benchmarks and moved to borrowed pointers