Added sorting

Change-Id: Id5e1e25a412fee5c344d0165a389d91c31d478e0