Added a separate function to do the area rotation.