refactoring advanced quiz