refactor to move design logic into its own module, really helped!