finish main structure