#265 solution