add RandomUtils, refactor math package