Just to be sure I well understood the objective of this part of code. ksort allow to sort services by priorities. So your high priority service will be called instead of lower priority one ?