#2 Refactor Code