update doesn;t work as the window is still shown on windows and the output doesn;t seem to be read properly. Have left the code in situ though as I'm confident I'm on the irght track