key update, some part taken out