changed to using apache Pair class