The constructive purpose of suffering