correctly handle codes and associate w/ dimensions. fixes #1