It is based upon the needs of the family or the potential for family violence. However, as a general rule, the custodial parent stays with the children in the marital residence.