basic implementation of ordered queue, improvements in checked_nums