added some attachment funcs