add principal scores calculation for low-dimensional case using old code