Modified after classwork