done with hw3 algs