adjusted some stuff
added profiling
added profiling