looping structures almost done