The two methods above only cal getX(), while they should be also calling getY() and getZ()