improve cookie module