some factory function of string