updated __getattr__ magic