further work on coding_sets - not yet finished