The court considers several factors to determine custody. These include the wishes of the child, the child’s age and maturity, and any special needs. It also takes into account the relationship between the child and each parent, the ability of each parent to care for the child, and the stability of each parent’s home environment.