Factor out addition of data into separate method.