refactors example