refactor view layout