Modified to account for vars in url