refacto convertResponse