started getattr rewrite