the simple clone should be using slice
added a isFunction helper