Final version of lab4 part 5