Separated position calculating functions