simplify add or update key