function for getting incremental result