refactored array sorting, restarting work on sidebar items