added last changes from cgx