trying to correct head position calculation