added profile and mulithreaded boolean flags