update the main key