added code to generate random numbers but still sluggish and crashing