how-is-custody-determined-in-a-divorce