Declare connected in the correct location