change the way of getPosition