finished task c, d, and e