adjust main layout