part d.b1 implemented, part d.a3 fixed maybe