added random walk code to generate random controls