got rid of compile time warnings. should probably indicate error better than make_pair(-1, -1)