refactor blib-build