refactor model_list_to_json method