adding updating ui for swiping and selecting tab