updated conde to ensure random is called every time