small fix in test and made language() more efficient