added string stripping, and make chr prepending optional