abstracted getattr