completed ui-lib conversion