small refactor for view builder