Small code refacto