allow function to be passed to bind