get_model_data refactor improved query filter