replaced normal Random with SecureRandom