refact view