adjust the main layout