why the getattr() instead of cursor.location ?