changed order of statements