getattr instead of dict