fixes

- add closure to auto_sort_obi fuction
- remove closure from command function