reorganized MIDAS into a package