url implementation and tests