fixed rand in test.rs