Coded visit children function