template that inserts sigmoidDiff to a sigmoid function