adding sort to cookie
sort is working properly