Updating code book