works seemlessly in JS / openfl