fix cutList function