now calculates position