[lib] modified ui & improved code