read the data
working unoptimized data extraction