for loops are weird in c