further refactor and rename