refactor view. simplify architecture