finish writing tests for random pairs