changed from saving to cookie and removed reference to script