added calculation of stddev and mean from subset of residues depending on amount of neighors. tested everything.