added different flags for debug and release mode