using promise to get the currentPosition