corrections of function creation
Adds more references
Uses srouce function instead of URL to code