Toy code for CodeReview question