implement partial read