Finally got local and global transformations working