Thanks for this trick. Done the modification in both functions, sh_to_sf and sf_to_sh