updated to use passed url