move WindowController to new file