fix + refactor