almost finish main