bugfix
added code for profiling
interface improved