macro to create an analysis engine