Working unit 6 code