updated output module with new toString method