added debug mode to turn parallel off