refreshing entire ui with a render function