added flag system for rotation of glass plane