modified compile api