work on cookies and arraylist