refactor list functions