change stack to list