Adding loops!!!

Adding loops and checking.