IMPORTANT: minor fix on the refactoring, merge when you can