add to_string logic a little