run coherence analysis as separate step. Fixed a variable name error.