Yeah... this is completely wrong. this.x(), this.y(), and this.z() don't do what you think they do.