script reducer