make getAttachment public