rebuild with lists instead of matrix