added insertion sort for arrays