extract method to determine last line number width