changed url parameter to local variable