fixing read to use sixe argument and chunk data