filtered the keys/legend part