Final version with corrections