committing with expanded getCookies function