implemented UserCode and CodeMap