Update alg3.h

Alg3 now returns its results