added escodegen manually after much frustration