Start to refactor resource_params method