use google lang detector if word lang fails & some refactoring