added two keys, and made NUM_KEYS work without needing a fixed number