added profiling code, worked with all profiletxt so far