flow chart for setup routine