added some (maybe useless) code for code generator