added debug flag and disable for release