added source link and fixed up var names