new method to fold strings