modified attachment class