use built in function to read data