Second version after Victor's feedback