Extract zombie detection to a separate method