use dispatch() instead of map_reduce(), and this instead of client parameter