adding support for collecting results