* added in comments to show what code corrosponds to
  different parts.