changed semantics of cook to place output ingredient in tool, if present