Code updated

Hi Edson,
I updated the code according to request.
Could you please verify it?
thanks in advance,
Rafael Alfaro