tweaks to syntax, make language recognition automatic