Why did West Virginia break away from Virginia?

there was a dispute that occured in Virginia during the road to the civil war. The part of Virginia who did not agree with slavery broke away from Virginia and joined the union.Hope this helps :)
it was more about the right to sucssed from the union