should have payed closer attention to the for statement