good morning!!!!
fixed bug in stages to refactor the code into two reusable functions PruneTableMultiCursor and PruneTable