figuring out why duplicate functions sometimes appear in pipeline