the sequential version works fine