working version translated by gwt's -draftCompile