Added looping and automating the graphs sections