Program 1 in lab 8