a version whcih FINALLY calculates rg (radius gyration) I think well.