prob hw 6 a–c
pulled in complex hw