Legal custody of a child is a parent's right and obligation to make decisions about a child's upbringing. When a parent has sole legal custody, he or she makes all decisions regarding the health, education, and welfare of the child. The other parent has no input on these decisions. If a parent without legal custody makes an important decision concerning the child, he or she may be taken to court and could potentially lose visitation rights with his or her child. In many states, courts now award joint legal custody to the parents, which means that the decision making is shared. Many judges prefer to award joint legal custody of a child because it assures that the child will have continual contact and involvement with both parents. If a parent shares joint legal custody, he or she may not exclude the other parent from the decision-making process. If this happens, the parent who was excluded may take the other parent to court and request that a judge enforce the original custody agreement and the parent who violated the agreement could potentially lose visitation rights with his or her child. In situations where neither parent can suitably assume custody of a child, perhaps because of a substance abuse or a mental health problem, legal custody may be granted to a temporary guardian or foster parent.