Create variable code book