consolidate the setup routines