Parents can ask the court to grant them sole or shared custody. If the parents are unmarried, an unmarried mother has sole legal and physical custody of her child until the court orders otherwise. The father must then establish paternity unless the parties voluntarily agree on paternity. If the parents are married, both parents share legal custody of the child and equal rights to parenting time until a court orders otherwise. The court can decide the parenting schedule and include details of how much time the child physically resides with each parent, and who can make important decisions about education or medical care. The court makes all decisions concerning custody and visitation by looking at what is in the best interest of the child.