add unit test

unit test to measure performance and also some regression tests