PLA-267 refactor visitor