removed the unused v parameter in getPos
rewrote the code to benefit from this change