added trivial cookies implementation