codei in ReasonerProcess restructured to make it more readable