Created methods for the loop