minor tweak to the 'API' for this function.  This allows the webdriver to be passed into custom functions, so it can provide useful information as it does in the default function.