add gen method and improve instruction list
added to compiler