Changed positionvector to a Matrix for increased functionality