created a build chart function among other things