use lists instead of arrays