fixed ismbid function