how to convert an object into string