main view implementation