better namespace logic