simpler check for key