better namespace solution which should handle exports