refactor and fix twolistoflist