changed order of execution