refactoring, cookies deleting fixed