added attach stmt