separate out some ui-y functions