changed order in which  is set when  is set