improved switchView and progressView