adds hide and close buttons