adding fhmm_exact and metrics from master branch