Lab49 interview question

Fix the bug. Then refactor the code how you want it.