added comparator for arrays.sort later