finish the function 'pruningLeft'