added serialFlush