reimplemented to support any target element, and multiple targets
3.0.0