refactor creation of claims in controller