modified do_numbering