switched from using database to using cookies