implemented isdead()