fix calculation, add CLI, add Milads file, rerun doc