Complete source for Lab 6