Lab6: Some functions added for part 2, very confused.