implemented as Haxe2