added sendPos function