shflags, functions