better tests, removed random function