added some extra checks to is_dead for row combinations. Was getting an error in replacement, and needed another check to eliminate the warnings and make sure it is working correctly.