refactor for "bonus" question