refactor portrait