refactor to openfl
fine for flash
not fine for neko