       options2 = options if not options2?
       Wd options2, cb2      
 
-# careful, below browser is a function so it get evaluated with the rest
-# of the code  
+# wrapper around Wd. 
+# a function returning the browser is passed in the 'with' option.
 WdWrap = (options, cb) ->
   [options,cb] = [null,options] if typeof options is 'function' 
   if cb?

      options.pre.apply @, [] if options?.pre?
      Sync ->
        Fiber.current.wd_sync_browser = options?.with?()
        cb.apply options?.with?(), []
        done() if done?
  if options
    # returning an identical function with context(browser) preconfigured 

    args.push done
    _moveTo.apply @, args
    
  # fixing click and doubleclick so it can be called without arguments 
  for m in ['click','doubleclick']
    do ->
      _m = browser[m]
