encode strinigfied data before saving