demo refactoring finally done