added debug flag to run