Implementing data() function.