avoid the use of deprecated `url` method