Shorten comparison function