Solution to bonus