finish main