he taught that pleasure and pain are the measures of what is good and evil ; death is the end of both body and soul and should therefore not be feared ; the gods do not reward or punish humans ; the universe is infinite and eternal ; and events in the world are ultimately based on the motions and interactions of atoms moving in empty space .