lot of idl, some fixes to sim