Sentence:  His power was so great that he even promoted and demoted gods <WSD>according</WSD> to whether they had given ear or been deaf to petitions . 
Meaning of the word marked with <WSD> tags:  go together