added die function.