one more change to sub-sample routine