move logic to url method