positioning algorithm modified