Thank you, can you modify the first code to implement the second and the fifth proposition ?