improve solution for multiply strings.