added mida fixed several errors