fixes puts statement using to_s