fixed setup routine