added friend class and fixed a leftover old style name function