Added conversion of result to string for output formatting