added some profiling and more testing