refactoring demos