implemented correct calculation of equilibrium price and quantity