added substrF function