extracted main window from app delegate