add makerandom and unit test