David Price

replaced smf substring with fn substring function