fixed output, added language support