refactored build environment