makes sort_by accept field name too