changing it to use list