Update Scope-drv.c

updated with code from the article, retained the extra comments.