modified treatment of a nonzero starting vector, but code still broken