major changes to instrument sorting module