finish main layout