Make by() use attributes