A few changes and here is the final version!