3sort + elementType.cs and improved sort - for abstract type