adding attachment support and tests