wrapping function result to preserve 'this'  see discussion in  #174