Move position update method to Task class