added sorting to ngs table view