minor refacto