small refactor view