finish main for testing