Adding sorting capability