implemented model view setup