Lab 1 code compiled up to part 3