Refactor exercise 3 juancarlos

Sorry for the delay... but here is the pull request