refactor with requirejs ok