Solution to technical exercise for Outpace