replace dies by throws