only thing i did in this chunk is that var at the top and use it for the reads