change Pair to ImmutablePair coz I don't have javafx.util.Pair
lots of bugfix