finished revising math for theorem 6