Made code easier to be tested