added time profiling and some more tests