how long does a child have to live with you to get custody. In most cases