Solution to the fifth challenge