need to pass the size correctly to the comparison function too