refactored old build tool.