rewrite of source recipe to break into pieces and add global idempotence