he had begun his career as the assistant prosecutor in uppsala , until he was recruited as an investigator by the ministry of justice , where he worked on bringing swedish law into accord with that of the eu , and he acquitted himself so well that for a time he was appointed division chief .