working getattr