small refacto