refactoring elaboration (completed challenge)