preparations for output