removed random function