min refactor