added debug mode.
suppressed stub warning