Added sorting

Change-Id: Ic92cb5bffd71b57f5128438510b5c3690d6dd3e8