fix comments + make it more generic (not only usable with event delegation)