fix and refacto