update for hw3: still needs fixes