initial work on multiple result set logic