refactor id_param_to_array