corrected the local global transformation