added generic output operator