adding word order logic