finished the loop to account for 3 , 5, and 3 + 5 at the same time