ui code cleaned