added show or hide ui functionality