add rand() and scale2d()