added support for datareader.