minor further refactor