almost done hw 3 algs