have to encode to string to save in db