moved all field querying with from attname to name in order to unify