updated pullAll function