• This code looks much simple than in the article