added comments and fixed issue in get_field_details