make sure that the die function can be called at all points