made the death checking more efficient