substring should be substr.