changed output procedure