making submitNext synchronized