update the build logical and improve the ui