improved random sample baseline script