added and modified loops and methods files