more small refactor