Added indents parameter in output() function