refactor to_s to return string