bust the build logic out into its own method