change Window code
move output code to debugDisplay function