adding flags for truncation. not tested yet