modified for seajs