add readData functions