changed order of code lines