refactor some small portions fo the code