Added Code generation Functionality