solves quadratic equations