no longer hard coding number of keys