added stubs.js to contain common stubs