stop using element.remove as it isn't supported in IE