And We had assigned for them fellows (in the worldly life) who beautified for them what was before them and what was behind them, and thus they believed that whatever they were doing was good. ` what was before them' refers to their present acts, while ` what was behind them' refers to their past acts. And (thus) the word (of punishment) became due against them along with the communities that passed before them from Jinns and human beings. Surely they were the losers.