another way to deal with keys