added debug option