challenge 13; intermediate solution in rust