use code in github instead of code from article