now uses cookie module instead of manual parsing