add a attachment functionality