update ui
reshuffling code