refactor sample data and add comments