code from github for my study