redefined to_string method scala