refactor with seajs