added rand seed