Added functionality to format output