Added and tested ForLoop method that accepts boundaries and function as parameter
Updated all for loops with new function