Refactor code iteration 0