added more codes in code_generator... still incomplete