Changed friend class to friend struct