Solution to q 4