Controller for main view

maybe it works