add attachment processing