Added GetSort stored procedure