behave more like c++ wrt to return pair