now window is not left open if initial view call crashes
view parameters can now be destructured