Refactor following the processing code as example to see that my code was fucking working