added support for returning statistical information