slight refactor in ui