use listbuffers instead of lists, don't build lists in reverse order