added cookies, hide/show buttons