updated to use type as the DOM class of the pointer.