Added blocking read
fixed things
Added read