added bar_format_length