fixed unnecessary temporary buffer creation during each read operation