refactor composite view and base view