small refacto'