randomize it working and main has a test for it.