handle die condition