refactor sample project