Updated position calculation