Adding hiding and showing history