fixed so we use list instead of array