Perhaps this can be a top level function as well and we just do the bind in this function.