refactor out rlist and wlist