more code generation + semantic checks