Map/reduce functions used in the garden