initialize attachment