changing read processing API, minor fixes