refined UI codes