This is standard visitor implementation.