refactor prep_nums