removed isFunction method