update STailQ, reduce non-common function