adding some additional tests

performance test, small refactoring