Solve #2
Refactor #1 & base solution