show and hide UI as appropriate