using toKey instead of compare
using toKey in docs as well