make filter and transform take a block, making usage slightly less awkward