fancier UI and optimization