added sorting code to git