Add data function and tests.