add trimSpaces option