fixed scale implementation and added totLenRank to stats.py for building depth