refactorizar codigo