Completed lab08 by replacing loops with other loop types