removed others
updated indexOf type and instance check