changed scope var from GET to COOKIE