Refactor code in functions such that it becomes easier to test
Refactor code in functions such that it becomes easier to test