refactor with the legal profile service