refactoring visitor class remove lookup table from it