methods and loops added