finished second round of coding for tutorial