fixed LOO code for TSM and added squared dist interpolation