Added lots of loops