Updated function to find random outcome