refactor layout view