hide and show buttons if they need