Added untested avarage sort algorithm