refact my cookie