add pair constructor for testing