move object->string formatting to new file