changed order of insert