object id comparison function