filled out dealing for table's next method