refactoring and define() example