make view mechanism more modular