Updated LP code with correct objective function