move visual functions to UI