added inSelection, and overrided containsRect instead of using fixPos()