added smartview logic