improving interation code
Cleaning code