string reduction