docs: function requires(id, contextPath, defaultId) {
  		var context, callback;
  		if (typeof defaultId === 'function') {
  			callback = defaultId;
  			defaultId = null;
  		}
  		if (contextPath) {
  			context = contexts[contextPath];
  			if (context === undefined) {
  				context = contexts[contextPath] = {
  					rel : context,
  					prefix: path.join(__dirname, '..', contextPath),
  					inContext: function(id) {
  						try {
  							var p = path.join(context.prefix,id);
  							if (require.resolve(p)) { // gives full path
  								return require(p);
  							}
  						} catch(ex) {}
  					}
  				};
  			}
      }
  
      switch(typeof id) {
        case 'object':
        case 'function':
          if (id) {
            return id; // straight object/function will just resolve straight away
          }
          break;
        case 'string':
          if (context) {
            // builtin modules take first priority
            var inContext = context.inContext(id);
            if (inContext) { return inContext; }
  
          }
  
          // if relative base on main script location
          if (id.charAt(0) === '.') {
            var inProject = path.join(ss.root,id);
            if (fs.existsSync(inProject+'.js')) {
              debug('found '+id);
              return require(inProject);
            }
          }
  
          // getting a packaged module
          var mod = projectOrHereRequire(id,ss.root);
          if (mod) {
            debug('found '+id+' in project or SocketStream');
            return require(mod);
          }
          break;
      }
  
  		if (context && defaultId) {
  			// default looked up in context first
  			var defaultInContext = context.inContext(defaultId);
  			if (defaultInContext) { return defaultInContext; }
  
  			// all bets are off
  			mod = projectOrHereRequire(defaultId,ss.root);
  			if (mod) {
  				debug('found '+defaultId+' in project or SocketStream');
  				return require(mod);
  			}
  		}
  
  		if (callback) {
  			return callback({
  				id:id
  			});
  		}
  		throw new Error('Cannot find module "' + id + '" in socketstream or project');
  	}