refactored build task