limits + compare function