connect routine, initialize routine