adding more efficient contraction routines