Implemented functionality to retrieve data.