Update PositionLib.java

refactoring