separated comparator fxn