added global X stuff