add attachment handling