Adding data retrieval code.