ensured str is not na - this may be an incorrect corner case