whoops copied my version of this. but this should either reference the dom element or your code