Updating for new cjs api