generate code implemented until exp