Imported v1/v2 of final code