modified ui code