namespaced friends functions