initial rewrite of build.jl