use random, fix #5