Small changes, now entirely matches the output of HZ's matlab code