move the definition to make it re-usable for `dndManager`