convert lists to tables