add list option and fix DeleteTrailingBlank function