many changes, mainly adding the new output window