refactored the example file