implemented simple code generation