change list to slice