fixed an issue related to name ordering
reordered implementation of get_new_fields