move defaultOptions into function scope