updated Glass code