new build way, and update library implementation