amei	code extracted from the amei vignette
