implemented checkStFlush function