mv the position of connect statement