if undefined return 0