Added read distribution code