add print function for result object