finish cookie generation