Fixed solution to q3.2