finished converting to requireJS