working version of last lab.