added c# sorting, need to do generic sorts