don't rely on the function having an apply method; apply Function.apply instead #10