add remove attachment functionality