change name of url loan function

this is more consistent with Programming Scala